package net.adetech.cjg.innerservice.controller;

import com.alibaba.fastjson.JSONObject;
import net.adetech.cjg.innerservice.entity.Dyba;
import net.adetech.cjg.innerservice.mapper.DybaDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DybaController {

    @Autowired
    DybaDao yhbaDao;

    @RequestMapping(value = "/cjg/dybaList",produces = "application/json")
    public String yhbaList(String sfzmhm)
    {
        List<Dyba> yhbaList = yhbaDao.getDybaListBySfzmhm(sfzmhm);
        return JSONObject.toJSONString(yhbaList);
    }
}
